home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mscfunct
/
com_init.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-05-06
|
346b
|
15 lines
#include <dos.h>
int com_init( port, baud, parity, stop, length )
int port, baud, parity, stop, length;
{
union REGS regs;
regs.x.ax = ((baud & 0x7) << 5) | ((parity & 0x3) <<3) |
((stop & 1) <<2) | (length & 0x3);
regs.x.dx = port;
int86( 0x14, ®s, ®s );
return( (int)regs.x.ax );
}